﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Collections.ObjectModel;
using BBEverNote.ViewModels;
using Thrift;
using Thrift.Protocol;
using Thrift.Server;
using Thrift.Transport;
using Evernote.EDAM.Type;
using Evernote.EDAM.UserStore;
using Evernote.EDAM.NoteStore;
using Evernote.EDAM.Error;
using EvernoteSharp;

namespace BBEverNote.Models
{
    public class EvernoteModel : ViewModelBase
    {
        public EvernoteModel()
        {
            ConsumerKey = "muzizongheng";
            ConsumerSecret = "21ddb2b15f47d314";
            EvernoteHost = "www.evernote.com"/*"sandbox.evernote.com"*/;
            EdamBaseUrl = "https://" + EvernoteHost;

            IsRememberMe = false;
            IsAutoLogOn = false;
        }

        string _consumerKey;

        public string ConsumerKey
        {
            get { return _consumerKey; }
            set
            { 
                _consumerKey = value;
                OnPropertyChanged("ConsumerKey");
            }
        }

        string _consumerSecret;

        public string ConsumerSecret
        {
            get { return _consumerSecret; }
            set 
            { 
                _consumerSecret = value;
                OnPropertyChanged("ConsumerSecret");
            }
        }

        string _evernoteHost;

        public string EvernoteHost
        {
            get { return _evernoteHost; }
            set 
            { 
                _evernoteHost = value;
                OnPropertyChanged("EvernoteHost");
            }
        }

        string _edamBaseUrl;

        public string EdamBaseUrl
        {
            get { return _edamBaseUrl; }
            set
            {
                _edamBaseUrl = value;
                OnPropertyChanged("EdamBaseUrl");
            }
        }

        bool _isRememberMe;

        public bool IsRememberMe
        {
            get { return _isRememberMe; }
            set
            {
                _isRememberMe = value;
                OnPropertyChanged("IsRememberMe");
            }
        }

        bool _isAutoLogOn;

        public bool IsAutoLogOn
        {
            get { return _isAutoLogOn; }
            set 
            {
                _isAutoLogOn = value;
                OnPropertyChanged("IsAutoLogOn");
            }
        }

        string _userName;

        public string UserName
        {
            get { return _userName; }
            set
            {
                _userName = value;
                OnPropertyChanged("UserName");
            }
        }

        string _password;

        public string Password
        {
            get { return _password; }
            set 
            { 
                _password = value;
                OnPropertyChanged("Password");
            }
        }

        string _authToken;

        public string AuthToken
        {
            get { return _authToken; }
            set 
            { 
                _authToken = value;
                OnPropertyChanged("AuthToken");
            }
        }

        User _enUser;

        public User ENUser
        {
            get { return _enUser; }
            set
            { 
                _enUser = value;
                OnPropertyChanged("ENUser");
            }
        }

        UserStoreWrapper _enUserStoreW;

        public UserStoreWrapper EnUserStoreW
        {
            get { return _enUserStoreW; }
            set 
            {
                _enUserStoreW = value;
                OnPropertyChanged("EnUserStoreW");
            }
        }

        NoteStoreWrapper _enNoteStoreW;

        public NoteStoreWrapper EnNoteStoreW
        {
            get { return _enNoteStoreW; }
            set 
            {
                _enNoteStoreW = value;
                OnPropertyChanged("EnNoteStoreW");
            }
        }
    }
}
